<!DOCTYPE html>
<html>
<head>
    <title>仓库位置</title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
        <Row :gutter="16" style="margin: 8px 0px 0px 1px">
            <div class="search-group">
                <i-col span="4">
                    <i-input v-model="q.posName" @on-enter="query" placeholder="货位名称"></i-input>
                </i-col>
                <i-button @click="query">查询</i-button>
                <i-button @click="reloadSearch">重置</i-button>
            </div>
        </Row>
        <Row :gutter="16" style="margin: 3px 0px 0px 0px;">
            <div class="buttons-group">
                #if($shiro.hasPermission("storeposition:save"))
                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
                #end
                #if($shiro.hasPermission("storeposition:update"))
                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
                #end
                #if($shiro.hasPermission("storeposition:delete"))
                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
                #end
            </div>
        </Row>
	    <table id="jqGrid"></table>
    </div>

    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
		<i-form ref="formValidate" :model="storePosition" :rules="ruleValidate" :label-width="80">
            <!--<Form-item label="删除标识" prop="delFlag">
                <i-input v-model="storePosition.delFlag" placeholder="删除标识"></i-input>
            </Form-item>
            <Form-item label="创建日期" prop="createDate">
                <i-input v-model="storePosition.createDate" placeholder="创建日期"></i-input>
            </Form-item>-->
            <Form-item label="仓库编码" prop="storeId">
                <i-input v-model="storePosition.storeId" placeholder="仓库编码" readonly></i-input>
            </Form-item>
            <Form-item label="货位名称" prop="posName">
                <i-input v-model="storePosition.posName" placeholder="货位名称"></i-input>
            </Form-item>
            <Form-item label="货位类型" prop="posType">
                <i-select v-model="storePosition.posType" placeholder="货位类型">
                    <i-option v-for="item in posTypeList" :value="item.value" :key="item.value">{{item.name}}
                    </i-option>
                </i-select>
                <!--<i-input v-model="storePosition.posType" placeholder="货位类型"></i-input>-->
            </Form-item>
            <Form-item label="货位排" prop="posRow">
                <i-input v-model="storePosition.posRow" placeholder="货位排"></i-input>
            </Form-item>
            <Form-item label="货位架" prop="posShelf">
                <i-input v-model="storePosition.posShelf" placeholder="货位架"></i-input>
            </Form-item>
            <Form-item label="货位层" prop="posLayer" v-if="storePosition.posType==1">
                <i-input v-model="storePosition.posLayer" placeholder="货位层"></i-input>
            </Form-item>
            <Form-item label="货位号" prop="posNo" v-if="storePosition.posType==1">
                <i-input v-model="storePosition.posNo" placeholder="货位号"></i-input>
            </Form-item>
            <Form-item label="备注" prop="remark">
                <i-input type="textarea" v-model="storePosition.remark" placeholder="备注"></i-input>
            </Form-item>
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px">返回</i-button>
                <i-button type="info" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
            </Form-item>
        </i-form>
	</Card>
</div>

<script src="${rc.contextPath}/js/sys/storeposition.js?_${date.systemTime}"></script>
</body>
</html>
